package com.ilancuo.thinkinjava.chapter_15;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.List;

public class ClassCasting {
    @SuppressWarnings("unchecked")
    public static void main(String[] args) throws Exception {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(args[0]));
        List<Widget> lw1 = List.class.cast(ois.readObject());
    }
}
